package com.google.code.kritter.data;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class AvailabilityStat {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long id;

    @Persistent
    private String zip;

    @Persistent
    private String brand;

    @Persistent
    private String sku;

    @Persistent
    private Boolean available;

    @Persistent
    private Date date;
    
    public AvailabilityStat( String zip, String brand, String sku, boolean available) {
    	this.zip = zip;
    	this.brand = brand;
    	this.sku = sku;
    	this.available = available;
    	this.date = new Date();
    }
    
    // get/set methods for the fields.  JDO doesn't use these, but your application does.

    public Long getId() {
        return id;
    }

    public String getZip() {
    	return zip;
    }

    public String getBrand() {
    	return brand;
    }

    public String getSku() {
    	return sku;
    }

    public Boolean getAvailable() {
    	return available;
    }

    public Date getDate() {
    	return date;
    }
}
